<?php
/*
 * @Descripttion: 
 * @Author: dedeye
 * @Date: 2020-02-25 21:25:24
 * @LastEditors: dedeye
 * @LastEditTime: 2020-02-28 14:20:21
 */

namespace app\admin\model;

use think\Model;

class Admin extends Model
{
    protected function getStatusTextAttr($value,$data)
    {
        $status = [-1=>'删除',0=>'禁用',1=>'正常',2=>'待审核'];
        return $status[$data['status']];
    }
    public function groups()
    {
        return $this->belongsToMany('RuleGroup','\\app\\admin\\model\\RuleGroupAccess');
    }
}
